import request from '@/utils/request'
// 获取所有收货地址
export function getAllAddressData() {
  return request({
    url: '/member/address/list',
    method: 'get'
  })
}
// 根据ID获取收货地址
export function getAddressData(id) {
  return request({
    url: '/member/address/' + id,
    method: 'get'
  })
}
// 修改收货地址
export function postUpdateAddressData(data) {
  return request({
    url: '/member/address/update/' + data.id,
    method: 'post',
    data: data
  })
}

// 添加收货地址
export function postAddAddressData(data) {
  return request({
    url: '/member/address/add',
    method: 'post',
    data: data
  })
}

// 删除收货地址 
export function postDeleteAddressData(id) {
  return request({
    url: '/member/address/delete/' + id,
    method: 'post'
  })
}